package com.zte.north.actions;

import java.util.ArrayList;
import java.util.HashMap;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Shell;

import com.zte.north.factories.ConsoleFactory;
import com.zte.north.objects.ResultObj;
import com.zte.north.utils.CommonUtil;

public class ExportRstAction extends SelectionAdapter {

	private Shell shell;
	private HashMap<String, ArrayList<ResultObj>> resulths = new HashMap<String, ArrayList<ResultObj>>();
	private int mode = 0;

	public ExportRstAction(Shell shell,
			HashMap<String, ArrayList<ResultObj>> resulths, int mode) {
		this.shell = shell;
		this.resulths = resulths;
		this.mode = mode;
	}

	public void widgetSelected(SelectionEvent e) {
		ConsoleFactory.showConsole();
		CommonUtil.getInstance().selectBatchStaReportPath(shell, "summary",
				resulths, mode);
	}

}
